﻿<phone:PhoneApplicationPage 
    x:Class="BlobTowerDefense.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="PortraitOrLandscape"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False"
    OrientationChanged="PhoneApplicationPage_OrientationChanged">
    <!--LayoutRoot is the root grid where all page content is placed-->
    <UserControl.Resources>
        <Storyboard x:Name="animation_Menu_Show_FromDown">
            <DoubleAnimation From="800" To="0" Duration="0:0:1.5"
                             Storyboard.TargetName="translate_Menu"
                             Storyboard.TargetProperty="Y">
                <DoubleAnimation.EasingFunction>
                    <BackEase EasingMode="EaseOut" Amplitude="0.5"/>
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
        </Storyboard>

        <Storyboard x:Name="animation_Menu_Show_FromUp">
            <DoubleAnimation From="-800" To="0" Duration="0:0:1"
                             Storyboard.TargetName="translate_Menu"
                             Storyboard.TargetProperty="Y">
                <DoubleAnimation.EasingFunction>
                    <BackEase EasingMode="EaseOut" Amplitude="0.5"/>
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
        </Storyboard>
        
        <Storyboard x:Name="animation_Menu_Hide_FromDown">
            <DoubleAnimation From="0" To="-800" Duration="0:0:1"
                             Storyboard.TargetName="translate_Menu"
                             Storyboard.TargetProperty="Y">
                <DoubleAnimation.EasingFunction>
                    <BackEase EasingMode="EaseIn" Amplitude="0.5"/>
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
        </Storyboard>

        <Storyboard x:Name="animation_Menu_Hide_FromUp">
            <DoubleAnimation From="0" To="800" Duration="0:0:1.5"
                                 Storyboard.TargetName="translate_Menu"
                                 Storyboard.TargetProperty="Y">
                <DoubleAnimation.EasingFunction>
                    <BackEase EasingMode="EaseIn" Amplitude="0.5"/>
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
        </Storyboard>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot" MaxWidth="Infinity" MaxHeight="Infinity">
        <Grid.RenderTransform>
            <TranslateTransform x:Name="translate_Menu"/>
        </Grid.RenderTransform>
        <Grid.RowDefinitions>   
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.Background>
            <ImageBrush ImageSource="../Images/Backgrounds/Background_MainMenu_Portrait.png"/>
        </Grid.Background>

        <Grid x:Name="Grid_Content"
                    Grid.Row="0" 
                    Margin="10,170,10,0"
                    Background="Transparent">
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="0"/>
            </Grid.ColumnDefinitions>
            <Button Name="buttonContinue"
                    Grid.Row="0"
                    Grid.Column="0"
                    Height="100"
                    Content="{Binding ConverterParameter=Continue_Label, Converter={StaticResource Localization}, Source={StaticResource Localization}}"
                    Click="buttonContinue_Click" Margin="0,0,0,0" 
                    IsEnabled="False"/>
            <Button Name="buttonNewGame"
                    Grid.Row="1"
                    Grid.Column="0"
                    Height="100"
                    Content="{Binding ConverterParameter=NewGame_Label, Converter={StaticResource Localization}, Source={StaticResource Localization}}" 
                    Click="buttonNewGame_Click"/>
            <Button Name="buttonSettings"
                    Grid.Row="2"
                    Grid.Column="0"
                    Height="100" 
                    Content="{Binding ConverterParameter=Settings_Label, Converter={StaticResource Localization}, Source={StaticResource Localization}}"
                    Click="buttonSettings_Click"/>
            <Button Name="buttonHelp"
                    Grid.Row="3"
                    Grid.Column="0"
                    Height="100" 
                    Content="{Binding ConverterParameter=Help_Label, Converter={StaticResource Localization}, Source={StaticResource Localization}}"
                    Click="buttonHelp_Click"/>
            <Button Name="buttonHighScores"
                    Grid.Row="4"
                    Grid.Column="0"
                    Height="100" 
                    Content="{Binding ConverterParameter=HighScores_Label, Converter={StaticResource Localization}, Source={StaticResource Localization}}"
                    Click="buttonHighScores_Click"/>
            <Button Name="buttonAbout"
                    Grid.Row="5"
                    Grid.Column="0"
                    Height="100" 
                    Content="{Binding ConverterParameter=About_Label, Converter={StaticResource Localization}, Source={StaticResource Localization}}"
                    Click="buttonAbout_Click"/>
        </Grid>
    </Grid>
</phone:PhoneApplicationPage>
